package com.chuangshu.chuangshuteam.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 团队邀请实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("team_invitations")
public class TeamInvitation implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 团队ID
     */
    private Long teamId;

    /**
     * 邀请人ID
     */
    private Long inviterId;

    /**
     * 被邀请用户ID（如果用户已存在）
     */
    private Long inviteeId;

    /**
     * 被邀请人微信openid（如果用户不存在）
     */
    private String inviteeOpenid;

    /**
     * 被邀请人姓名
     */
    private String inviteeName;

    /**
     * 邀请方向
     */
    private String direction;

    /**
     * 邀请状态：pending, accepted, expired, revoked
     */
    private String status;

    /**
     * 邀请码
     */
    private String inviteCode;

    /**
     * 过期时间
     */
    private LocalDateTime expiresAt;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}